package com.hxd.otc.module.my.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.hxd.otc.R;
import com.hxd.otc.base.BaseAdapter;
import com.hxd.otc.module.my.bean.BankAeraChooseBean;

import butterknife.BindView;
import butterknife.ButterKnife;

public class BankAeraChooseAdapter extends BaseAdapter<BankAeraChooseAdapter.BankAeraChooseHolder, BankAeraChooseBean> {

    public BankAeraChooseAdapter(Context context) {
        super(context);
    }

    @Override
    protected void onBindHolder(@NonNull BankAeraChooseHolder holder, int position) {
        BankAeraChooseBean item = getItem(position);
        holder.tvAera.setText(item.getAeraName());
    }

    @NonNull
    @Override
    public BankAeraChooseHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new BankAeraChooseHolder(mInflater.inflate(R.layout.item_bank_aera_choose, parent, false));
    }

    static class BankAeraChooseHolder extends RecyclerView.ViewHolder {
        @BindView(R.id.tv_aera)
        TextView tvAera;

        BankAeraChooseHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this, itemView);
        }
    }
}


